/*
 * This file is part of connotea-java.
 *
 * connotea-java is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * connotea-java is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

package org.connotea;

import java.util.Map;

/**
 * Interface defining required methods for a unit which connects to the Connotea
 * API (i.e. the raw HTTP client).
 */
public interface Connector {

    /**
     * Return the response from an HTTP GET to the given URI.
     * 
     * @param uri the URI
     * @return the response
     */
    public Response get(String uri);

    /**
     * Return the response from an HTTP POST to the given URI with the given
     * parameters.
     * 
     * @param uri the URI
     * @param parameters the parameters
     * @return the response
     */
    public Response post(String uri, Map<String, String> parameters);
}
